package com.tmall.controller;

import com.tmall.pojo.User;
import com.tmall.service.LikeTheArticle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 吕兵星
 * @date 2020/12/3 13:30
 */
@RestController
public class RedisController {
    @Autowired
    private LikeTheArticle likeTheArticle;

    @RequestMapping("/like")
    public  String likeTheArticle(User user){
        int i = likeTheArticle.likeIncrement(user);
        return i+"";
    }
}
